<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head lang="zh-CN">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap-theme.css.map"/>
    <link rel="stylesheet" type="text/css" href="../css/dashboard.css"/>
    <script src="../script/jquery-1.11.3.js"></script>
    <script src="../ckeditor/ckeditor.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button class="navbar-toggle collapsed" aria-expanded="false" aria-controls="navbar" type="button" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">LazyEgg-后台管理</a>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <c:import url="/admin/adminShare.jsp" />
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h2 class="sub-header">食物编辑</h2>
            <form action="AdminFoodEditServlet.html" enctype="multipart/form-data" method="post">
                    <table class="tbFoods">
                        <tr>
                            <td>食物名称:</td>
                            <td><input name="foodName" type="text" value="${food.foodName}"/></td>
                        </tr>
                        <tr>
                            <td>食物类型:</td>
                            <td>
								<select name="foodTypeSelect">
									<c:forEach var="foodType" items="${allFoodType}">
										<c:choose>
											<c:when test="${foodType.ftId==ftId}">
												<option value="${foodType.ftId}" selected="selected">${foodType.foodTypeName}</option>
											</c:when>
											<c:otherwise>
												<option value="${foodType.ftId}">${foodType.foodTypeName}</option>
											</c:otherwise>
										</c:choose>
									</c:forEach>
								</select>
							</td>
                        </tr>
                        <tr>
                        	<td>食物价格:</td>
                        	<td><input name="foodPrice" type="text" value="${food.foodprice}"/></td>
                        </tr>
                        <tr>
                            <td>食物详情:</td>
                            <td class="foodsDesc"><textarea name="foodDesc" class="ckeditor">${food.description}</textarea></td></td>
                        </tr>
                        <tr>
                            <td>图片路径:</td>
                            <td class="foodsDesc"><input name="imgPath" type="file" class="ckeditor"/></td></td>
                        </tr>
                        <tr><td></td>
                            <td><input name="foodId" type="hidden" value="${food.fId}" /><input type="submit" value="保存"/><input type="reset" value="取消"/></td>
                        </tr>
                    </table>
            </form>
        </div>
    </div>
</div>
</body>
</html>